﻿#define _CRT_SECURE_NO_WARNINGS 1

//编程初学者入门训练第四十六题
//BC48 字母大小写转换
//https://www.nowcoder.com/practice/850ebd30a2a34cfc87199da3fc15786a?tpId=107&tqId=33329&rp=1&ru=/exam/oj/ta&qru=/exam/oj/ta&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D107&difficulty=undefined&judgeStatus=undefined&tags=&title=

#include <stdio.h>
#include <ctype.h>
int main() {
    char ch;
    while (scanf("%c", &ch) != EOF) {
        getchar();
        if (ch >= 'A' && ch <= 'Z') {
            printf("%c\n", tolower(ch));
        }
        if (ch >= 'a' && ch <= 'z') {
            printf("%c\n", toupper(ch));
        }
    }
    return 0;
}